package junit;

import org.junit.Assert;
import org.junit.Test;

public class CalculatorTest {
	
	Calculator calculator = new Calculator();
    
    @Test
    public void testAddition() {
        
        int result = calculator.add(2, 3);
        Assert.assertEquals(5, result);
    }
    
    @Test
    public void testSubtraction() {
        int result = calculator.subtract(5, 3);
        Assert.assertEquals(2, result);
    }
    
    @Test
    public void testMultiplication() {
        int result = calculator.multiply(2, 3);
        Assert.assertEquals(6, result);
    }
    
	@Test
    public void testDivision() {
        double result = calculator.divide(10, 2);
        Assert.assertEquals(5, result, 0.0001);
    }
}

